local MobaBottomView = MClass("MobaBottomView")
local SkillView = require("app.battleV3.ui.objs.MeleeSkill")
local BuffView = require("app.battleV3.ui.objs.MeleeBuff")


function MobaBottomView:ctor()
    --self.root 默认为根节点
    --设置事件
    self.skillViewPos = self:findChild("mpba_skill")
    self.skillView =  SkillView.new(cc.CSLoader:createNode(Res.MeleeSkill,false,true))
    self.skillViewPos:addChild(self.skillView.root)

    self.buffView = BuffView.new(self:findChild("buff"))

    local function onNodeEvent(event)
        if "enter" == event then
        elseif "exit" == event then
            -- self.equipView:removeFromParent()
            self.skillView:removeFromParent()
            BattleUIEvent:removeEvent(BattleUIEvent.TYPE.MELEE_PROP)
        end
    end
    self:registerScriptHandler(onNodeEvent) 
end

return MobaBottomView